<div class="pagination" ng-if="pages.length >= 2">
  <ul class="pagination">

    <li>
      <a ng-click="selectPage(1)" aria-label="First">
        <span aria-hidden="true">首页</span>
      </a>
    </li>
    <li>
      <a ng-click="selectPage(currentPage-1)" aria-label="Previous">
        <span aria-hidden="true">&larr;</span>
      </a>
    </li>

    <li ng-repeat="page in pages" ng-class="{active: page==currentPage}"><a ng-click="selectPage(page)">{{page}}</a></li>

    <li>
      <a ng-click="selectPage(currentPage+1)" aria-label="Next">
        <span aria-hidden="true">&rarr;</span>
      </a>
    </li>
    <li>
      <a href="" ng-click="selectPage(numPages)" aria-label="Last">
        <span aria-hidden="true">尾页</span>
      </a>
    </li>
  </ul>
</div>